package cn.quevo.spring.entity;

import cn.quevo.core.entity.ResultEntity;
import cn.quevo.core.enums.ResultStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.lang.reflect.MalformedParameterizedTypeException;
import java.util.Map;

/**
 * 文件上传结果
 *
 * @author July july_sky@foxmail.com
 * @version 1.0
 * @date 2018/07/09 14:59:53
 * @Copyright 东方浩星（北京）传媒科技有限公司版权所有.All Rights Reserved.
 */
@Data
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class UploadResult extends ResultEntity {

    /**
     * 相对路径
     */
    private String relativePath;
    /**
     * 文件大小
     */
    private Long fileSize;
    /**
     * 图片宽度
     */
    private Integer imgWidth;
    /**
     * 图片高度
     */
    private Integer imgHeight;
    /**
     * 文件名称
     */
    private String fileName;
    /**
     * 完整名称 (路径+名称)
     */
    private String fulleName;

    /**
     * 请求参数
     */
    private Map<String, String> requestParams;

    public UploadResult() {
        super(ResultStatusEnum.SUCCESS);
    }

    public UploadResult setRequestParams(Map<String,String> requestParams) {
        this.requestParams = requestParams;
        return this;
    }
}
